@charset "utf-8"
{{ $extraColors := site.Params.colors.extra }}
{{ $fontAwesomeVersion := site.Params.font_awesome_version }}
{{ $fonts := site.Params.fonts }}
{{ if $fonts }}
{{ $fontSlice := (slice) }}
{{ range $fonts }}
{{ $fontSlice = $fontSlice | append (printf "%s:%s" (replace .name " " "+") (delimit .sizes ",")) }}
{{ end }}
{{ $fontsUrl := printf "https://fonts.googleapis.com/css?family=%s" (delimit $fontSlice "|") }}
@import url("{{ $fontsUrl }}")
{{ end }}

{{ with $fontAwesomeVersion }}
{{ $fontAwesomeUrl := printf "https://use.fontawesome.com/releases/v%s/css/all.css" . }}
@import url("{{ $fontAwesomeUrl }}")
{{ end }}

// Site-specific variables here
$harbor-blue: #4495d7
$harbor-green: #60b932
$twitter-blue: rgb(29, 161, 242)
$slack-green: #2EB67D

// Extra colors specified in config
{{ with $extraColors }}
{{ range . }}
${{ .name }}: '{{ .hex }}'
{{ end }}
{{ end }}

// Initial Bulma imports
@import "bulma/sass/utilities/initial-variables"
@import "bulma/sass/utilities/functions"

// Bulma-specific overrides
$primary: $harbor-blue
$secondary: $harbor-green
$link: $primary
$navbar-height: 4rem
$navbar-item-img-max-height: $navbar-height * 0.6
$menu-label-font-size: 1rem
$navbar-dropdown-radius: none
$navbar-dropdown-border-top: none
$list-radius: none
$modal-content-width: 50%

// Font overrides
{{ if $fonts }}
// Sans-serif font
{{ with (index (where $fonts ".type" "sans_serif") 0).name }}
$family-sans-serif: "{{ . }}", BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif
{{ end }}

// Monospace font
{{ with (index (where $fonts ".type" "monospace") 0).name }}
$family-monospace: "{{ . }}", monospace
{{ end }}
{{ end }}

// Final Bulma imports
@import "bulma/sass/utilities/derived-variables"

// Bulma variable overrdides that require derived variables like $dark
$colors: mergeColorMaps(("secondary": ($secondary, $white), "twitter-blue": ($twitter-blue, $white), "slack-green": ($slack-green, $white)), $colors)
$menu-item-active-color: $primary
$menu-item-active-background-color: $white-bis
$menu-item-radius: none
$code: $dark
$code-background: $light

// Bulma core
@import "bulma/sass/utilities/_all"
@import "bulma/sass/base/_all"
@import "bulma/sass/elements/container"
@import "bulma/sass/grid/columns"
// @import "bulma/sass/grid/tiles"
@import "bulma/sass/layout/hero"
@import "bulma/sass/layout/section"
@import "bulma/sass/layout/footer"

// Elements

// @import "bulma/sass/elements/box"
@import "bulma/sass/elements/button"
@import "bulma/sass/elements/content"
@import "bulma/sass/elements/icon"
@import "bulma/sass/elements/image"
// @import "bulma/sass/elements/notification"
// @import "bulma/sass/elements/progress"
// @import "bulma/sass/elements/table"
@import "bulma/sass/elements/tag"
@import "bulma/sass/elements/title"
// @import "bulma/sass/elements/other"

// Forms
@import "bulma/sass/form/shared"
@import "bulma/sass/form/input-textarea"
// @import "bulma/sass/form/checkbox-radio"
// @import "bulma/sass/form/select"
// @import "bulma/sass/form/file"
@import "bulma/sass/form/tools"

// Components
// @import "bulma/sass/components/breadcrumb"
@import "bulma/sass/components/card"
@import "bulma/sass/components/dropdown"
@import "bulma/sass/components/level"
@import "bulma/sass/components/list"
@import "bulma/sass/components/media"
@import "bulma/sass/components/menu"
// @import "bulma/sass/components/message"
@import "bulma/sass/components/modal"
@import "bulma/sass/components/navbar"
// @import "bulma/sass/components/pagination"
// @import "bulma/sass/components/panel"
// @import "bulma/sass/components/tabs"

// Custom Sass imports
@import "admonition"
@import "helpers"
@import "toc"
